/**     
* @Title: ShiroRedisPropertySource.java   
* @Package com.yitong.spring.shiro   
* @Description: TODO   
* @author xaoyaoyao
* @date 2017年7月23日 下午12:19:18
*/
package com.yitong.spring.shiro;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @ClassName: MyRedisPropertySource
 * @Description: TODO
 * @author xaoyaoyao
 * @date 2017年7月23日 下午12:19:18
 * 
 */
@Component
@ConfigurationProperties(prefix = "shiro.redis")
@PropertySource("classpath:config/shiro-redis.properties")
public class ShiroRedisPropertySource {

	private String host;

	private int port;

	private String password;

	private int database;

	private int timeout;

	private int maxIdle;

	private long maxWait;

	private int minIdle;

	private int maxTotal;

	/**
	 * @return the host
	 */
	public String getHost() {
		return host;
	}

	/**
	 * @param host
	 *            the host to set
	 */
	public void setHost(String host) {
		this.host = host;
	}

	/**
	 * @return the port
	 */
	public int getPort() {
		return port;
	}

	/**
	 * @param port
	 *            the port to set
	 */
	public void setPort(int port) {
		this.port = port;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 *            the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * @return the database
	 */
	public int getDatabase() {
		return database;
	}

	/**
	 * @param database
	 *            the database to set
	 */
	public void setDatabase(int database) {
		this.database = database;
	}

	/**
	 * @return the timeout
	 */
	public int getTimeout() {
		return timeout;
	}

	/**
	 * @param timeout
	 *            the timeout to set
	 */
	public void setTimeout(int timeout) {
		this.timeout = timeout;
	}

	/**
	 * @return the maxIdle
	 */
	public int getMaxIdle() {
		return maxIdle;
	}

	/**
	 * @param maxIdle
	 *            the maxIdle to set
	 */
	public void setMaxIdle(int maxIdle) {
		this.maxIdle = maxIdle;
	}

	/**
	 * @return the maxWait
	 */
	public long getMaxWait() {
		return maxWait;
	}

	/**
	 * @param maxWait
	 *            the maxWait to set
	 */
	public void setMaxWait(long maxWait) {
		this.maxWait = maxWait;
	}

	/**
	 * @return the minIdle
	 */
	public int getMinIdle() {
		return minIdle;
	}

	/**
	 * @param minIdle
	 *            the minIdle to set
	 */
	public void setMinIdle(int minIdle) {
		this.minIdle = minIdle;
	}

	/**
	 * @return the maxTotal
	 */
	public int getMaxTotal() {
		return maxTotal;
	}

	/**
	 * @param maxTotal
	 *            the maxTotal to set
	 */
	public void setMaxTotal(int maxTotal) {
		this.maxTotal = maxTotal;
	}

	@Override
	public String toString() {
		return "MyRedisPropertySource [host=" + host + ", port=" + port + ", password=" + password + ", database="
				+ database + ", timeout=" + timeout + ", maxIdle=" + maxIdle + ", maxWait=" + maxWait + ", minIdle="
				+ minIdle + ", maxTotal=" + maxTotal + "]";
	}
}
